﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="CustomerContactSystem.WebForms.Admin.Users.List" %>
<%@ Import Namespace="CustomerContactSystem.Core.Infrastructure.Utility" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>Users</h1>
<asp:HyperLink ID="CreateNewLink" runat="server" Text="Create New User" NavigateUrl="~/Admin/Users/Create.aspx" CssClass="button"></asp:HyperLink>
<asp:Repeater ID="UserList" runat="server" OnItemDataBound="UserListItemDataBound">
<HeaderTemplate>
<table>
    <thead>
        <tr>
            <th id="Username">Username</th>
            <th id="DisplayName">DisplayName</th>
            <th id="Email">Email</th>
            <th id="FirstPoint">Front Line?</th>
            <th id="AreaCovered">Area Covered</th>
            <th id="IsActive">Active?</th>
            <th id="Options">Options</th>
        </tr>
    </thead>
    <tbody>
</HeaderTemplate>
<ItemTemplate>
        <tr>
            <td headers="Username"><a id='<%#Eval("Id")%>'></a><%#Eval("Username")%></td>
            <td headers="DisplayName"><%#Eval("DisplayName")%></td>
            <td headers="Email"><%#Eval("Email")%></td>
            <td headers="FirstPoint"><%#Eval("FirstPointOfContact").ToString().ToYesNo()%></td>
            <td headers="AreaCovered"><%#Eval("AreaCovered")%></td>
            <td headers="IsActive"><%#Eval("IsActive").ToString().ToYesNo()%></td>
            <td headers="Options">
                <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
            </td>
        </tr>
</ItemTemplate>
<FooterTemplate>
    </tbody>
</table>
</FooterTemplate>
</asp:Repeater> 
</asp:Content>
